/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2019-2022. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * Description:
 * Author: huawei
 * Create: 2019-10-15
 */

#ifndef DEVMM_CGROUP_MNG_H
#define DEVMM_CGROUP_MNG_H

#include <linux/cgroup.h>
#include <linux/mm.h>
#include "devmm_addr_mng.h"

struct mem_cgroup *devmm_enable_cgroup(struct mem_cgroup **memcg, pid_t pid);
void devmm_disable_cgroup(struct mem_cgroup *memcg, struct mem_cgroup *old_memcg);
void devmm_split_page_memcg(struct page *page, u64 page_num);
bool devmm_can_get_continuity_page(void);

#endif /* DEVMM_CGROUP_MNG_H__ */
